package com.example.demo.vo;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 用户添加VO
 */
public class UserAddVO implements Serializable {

    /**
     * 手机号码
     */
    @Pattern(regexp = "[0-9]{11,11}", message = "手机号必须为11位")
    private String mobilePhone;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 用户名
     */
    @NotNull(message = "用户名不能为空")
    @Pattern(regexp = "[0-9a-zA-Z_.@]{4,30}", message = "用户名必须是4-30位字符组成,不能含有特殊字符")
    private String userName;


    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}
